package org.agile4j.easypoi.entity;

import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
 * Created by Administrator on 2016/7/20.
 */
public class Item1Entity {
    private String id ;
    private String desc ;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this) ;
    }

    @Override
    public boolean equals(Object other) {
//        return EqualsBuilder.reflectionEquals(other, this);
        if(this == other){
            return true;
        }

        if(other == null){
            return false;
        }

        if( !(other instanceof Item1Entity)){
            return false;
        }

        final Item1Entity item1Entity = (Item1Entity)other;
        if( !getId().equals(item1Entity.getId())){
            return false;
        }

        return true;
    }
}
